import request from '@/utils/request'

export function getComments(params) {
  return request({
    url: '/comment',
    method: 'get',
    params
  })
}

export function addComment(data) {
  return request({
    url: '/comment/add',
    method: 'post',
    data
  })
}

export function updateComment(commentId, data) {
  return request({
    url: `/comment/update/${commentId}`,
    method: 'put',
    data
  })
}

export function deleteComment(commentId) {
  return request({
    url: `/comment/delete/${commentId}`,
    method: 'delete'
  })
}